<template>
  <common-page
    ref="commonPage"
    :bg-path="bgPath"
    :web-path="webPath"
    :columns="columns"
    :search-items="searchItems"
    :form-items="formItems"
  />
</template>
<script>
export default {
  data() {
    return {
      // ===== ===== ===== ===== 全局属性 ===== ===== ===== =====
      // 后台接口路径
      bgPath: 'health/health/score/score',
      // Web路径
      webPath: 'health/Health/Score/Score',
      // ===== ===== ===== ===== 页面配置 ===== ===== ===== =====
      // 搜索内容
      searchItems: [
        {
          rowIndex: 1,
          items: [
            {
              code: "code",
              name: "编码",
              span: 6,
              type: "text",
              config: {
                edit: false
              }
            },
            {
              code: "recordType",
              name: "记录类型",
              span: 6,
              type: "select",
              config: {
                edit: false,
                options: [
                  { key: "1", value: "饮食" },
                  { key: "2", value: "运动" },
                  { key: "3", value: "按摩" },
                  { key: "4", value: "睡眠" }
                ]
              }
            }
          ]
        }
      ],
      // 列表内容
      columns: [
        {
          code: "code",
          name: "编码",
          span: 6,
          type: "text",
          config: {
            edit: false
          }
        },
        {
          code: "recordType",
          name: "记录类型",
          span: 6,
          type: "select",
          config: {
            edit: false,
            options: [
              { key: "1", value: "饮食" },
              { key: "2", value: "运动" },
              { key: "3", value: "按摩" },
              { key: "4", value: "睡眠" }
            ]
          }
        },
        {
          code: "scoreNum",
          name: "积分值",
          span: 6,
          type: "number",
          config: {
            edit: false,
            precision: 2
          }
        }
      ],
      // 增加/修改/详情 表单
      formItems: [
        {
          rowIndex: 1,
          items: [
            {
              code: "code",
              name: "编码",
              span: 6,
              type: "text",
              config: {
                edit: false
              }
            },
            {
              code: "recordType",
              name: "记录类型",
              span: 6,
              type: "select",
              config: {
                edit: false,
                options: [
                  { key: "1", value: "饮食" },
                  { key: "2", value: "运动" },
                  { key: "3", value: "按摩" },
                  { key: "4", value: "睡眠" }
                ]
              }
            },
            {
              code: "scoreNum",
              name: "积分值",
              span: 6,
              type: "number",
              config: {
                edit: false,
                precision: 2
              }
            }
          ]
        }
      ]
    }
  }
}
</script>
